var opt4sex = [{label:"男", value:"Male"}, {label:"女", value:"Female" }];		
var c4sex = { _options: opt4sex };

var c4vip = {check:"true", uncheck:"false"};		

function raiseMessage(msg) {
	$zxtUI.__messager.setMessage(msg);
}

function commit(dw) {
	
	raiseMessage("页面正在提交, 请稍候  ... ...");
	
	var response = null;
	var callback = {
		onSuccess : function(ei) {
			response = ei;			
		},
		onFailure : function(xmlR, status, e) {
			alert("ERROR");
		}
	};

	var request = dw;
	if ( request == undefined ){
		request =  new zxt.data.DataWrapper();
		request.addComponents();
	}	
	
	$zxt.commit(request, callback);
	
	if ( response == null ){
		raiseMessage("");
		return;
	}
	
	var status = response.attrs().status;
	
	if ( status == "1" ){
		var msg = response.message() || "您的操作已成功提交!";		
		raiseMessage(msg);
	} else {
		var msg = response.message() || "您的操作没有被成功提交!";
		alert(msg);
	}
	return response;
};
